﻿
create PROCEDURE [dbo].[proc_Department_GetList_ByCompanyId]
	
	@Companyid VARCHAR(30)
	
	
AS

	SELECT Id,bmbh, case when len(bmbh)>4 then replicate('┆┄┄',(len(bmbh)-4)/2)+
	isnull(dname,'') else '◆'+isnull(dname,'') end as DName from Department WHERE
	companyid=(SELECT companyid FROM zzjg z WHERE z.bh=@Companyid ) and bmbh is not null order by bmbh